<template>
  <div class="box">
    <el-breadcrumb separator=">">
      <el-breadcrumb-item to="/login" replace>首页</el-breadcrumb-item>
      <el-breadcrumb-item>平台运营</el-breadcrumb-item>
      <el-breadcrumb-item>理财红包设置</el-breadcrumb-item>
    </el-breadcrumb>
    <div class="tableBox">
      <div class="tableTitle">理财红包设置</div>
      <div class="searchBox">
        <el-form size="mini" inline>
          <div class="block">
            <el-form-item>
              <el-button icon="el-icon-circle-plus" type="primary" @click="redEnvelopeAdd">添加</el-button>
            </el-form-item>
          </div>
        </el-form>
      </div>
      <el-table :data="tableData">
        <el-table-column type="index" label="序号" width="60" align="center"></el-table-column>
        <el-table-column prop="" label="红包批次编号" align="center"></el-table-column>
        <el-table-column prop="" label="红包名称" align="center"></el-table-column>
        <el-table-column prop="" label="绑定理财编号" align="center"></el-table-column>
        <el-table-column prop="" label="总数量" align="center"></el-table-column>
        <el-table-column prop="" label="剩余数量" align="center"></el-table-column>
        <el-table-column prop="" label="使用门槛金额" align="center"></el-table-column>
        <el-table-column prop="" label="返还金额" align="center"></el-table-column>
        <el-table-column prop="" label="活动时间" align="center"></el-table-column>
        <el-table-column prop="" label="首页推广图" align="center"></el-table-column>
        <el-table-column prop="" label="财富首页推广图" align="center"></el-table-column>
        <el-table-column prop="" label="详情背景图" align="center"></el-table-column>
        <el-table-column prop="" label="背景颜色" align="center"></el-table-column>
        <el-table-column prop="" label="批次状态" align="center"></el-table-column>
        <el-table-column label="查看使用详情" align="center">
          <template slot-scope="data">
            <router-link :to="{path: 'redEnvelopeUseInfo', query: {discountId: data.row.discountId}}">查看</router-link>
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center">
          <template slot-scope="data">
            <span class="colors" @click="releaseRedEnvelope(data.row)">发布</span>
            <span class="colors" @click="ObtainedRedEnvelope(data.row)">下架</span>
          </template>
        </el-table-column>
      </el-table>
      <pagination :maxTotal="maxTotal" @handleSize="handleSizeChange" @handleCurrent="handleCurrentChange"></pagination>
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
  import pagination from 'components/pagination'

  export default {
    data () {
      return {
        maxTotal: 10,
        tableData: []
      }
    },
    created () {
    },
    methods: {
      redEnvelopeAdd () {
        this.$router.replace('redEnvelopeAdd')
      },
      releaseRedEnvelope (item) {
      },
      ObtainedRedEnvelope (item) {
      },
      handleSizeChange (val) {
      },
      handleCurrentChange (val) {
      }
    },
    components: {
      pagination
    }
  }
</script>

<style lang="less" ref="stylesheet/less" scoped>

</style>
